﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <script type="text/javascript" >
        function OnbtOk_Click() {      
            var userName = document.getElementById("txtUserName").value;
            //var ws = new WebService1();
            ShowMsg(Welcome(userName));
        }
        function Welcome(User)
        {
            var UserName = "";
            if(User=="")
            {
                UserName="游客"
            }
            else {
                UserName = User;
            }
            var strMsg = "谢谢[" + UserName + "]选择ASP.NET3.5入门到精通";
            var strResult = strMsg.toString();
            alert(strResult);
            //return strMsg;
        }
         function ShowMsg(result) {
                    var strResult = result.toString();
                    document.getElementById("divMsg").innerHTML = strResult;
                    //alert(strResult);
                }
    </script>
    <style type="text/css">
        #btnSubmit {
            width: 40px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div> 
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        请输入你的姓名:<input id="txtUserName" type="text" value="" />
        <input id="Button1" type="button" value="button" onclick="OnbtOk_Click()"/><br />
        </div>

    </form>

</body>
</html>
